<?php

namespace App\Observers;

use App\Handlers\KeysHandler;
use App\Models\Order;
use Illuminate\Support\Facades\Cache;

class OrderObserver
{
    public function saved(Order $order)
    {
        Cache::forget(sprintf(KeysHandler::ORDER,$order->id));
    }

    public function deleted(Order $order)
    {
        Cache::forget(sprintf(KeysHandler::ORDER,$order->id));
    }
}
